<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>pair - ClueLib</title><link rel="stylesheet" type="text/css" href="../styles/main.css"><script language=JavaScript src="../javascript/main.js"></script><script language=JavaScript src="../javascript/prettify.js"></script></head><body class="FramedContentPage" onLoad="NDOnLoad();prettyPrint();"><script language=JavaScript><!--
if (browserType) {document.write("<div class=" + browserType + ">");if (browserVer) {document.write("<div class=" + browserVer + ">"); }}// --></script>

<!--  Generated by Natural Docs, version 1.52 -->
<!--  http://www.naturaldocs.org  -->

<!-- saved from url=(0026)http://www.naturaldocs.org -->




<div id=Content><div class="CClass"><div class=CTopic id=MainTopic><h1 class=CTitle><a name="pair"></a>pair</h1><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>class pair#(</td><td class="PType  prettyprint " nowrap>type&nbsp;</td><td class="PParameter  prettyprint " nowrap>T1</td><td class="PDefaultValuePrefix  prettyprint ">&nbsp;=&nbsp;</td><td class="PDefaultValue  prettyprint " width=100%> int,</td></tr><tr><td></td><td class="PType  prettyprint " nowrap>type&nbsp;</td><td class="PParameter  prettyprint " nowrap>T2</td><td class="PDefaultValuePrefix  prettyprint ">&nbsp;=&nbsp;</td><td class="PDefaultValue  prettyprint " width=100%> T1</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Provides a pair that carries two values, which can be different types.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>T1</td><td class=CDLDescription><span class="optional">optional</span> The type of the first value of a pair.&nbsp; The default is <b>int</b>.</td></tr><tr><td class=CDLEntry>T2</td><td class=CDLDescription><span class="optional">optional</span> The type of the second value of a pair.&nbsp; The default is the same type as <b>T1</b>.</td></tr></table><!--START_ND_SUMMARY--><div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable><tr class="SMain"><td class=SEntry><a href="#pair" id=link1 onMouseOver="ShowTip(event, 'tt1', 'link1')" onMouseOut="HideTip('tt1')">pair</a></td><td class=SDescription>Provides a pair that carries two values, which can be different types.</td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#pair.Types" >Types</a></td><td class=SDescription></td></tr><tr class="SType SIndent2 SMarked"><td class=SEntry><a href="#pair.this_type" id=link2 onMouseOver="ShowTip(event, 'tt2', 'link2')" onMouseOut="HideTip('tt2')">this_type</a></td><td class=SDescription>The shorthand of <b>pair#(T1,T2)</b>.</td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#pair.Properties" >Properties</a></td><td class=SDescription></td></tr><tr class="SProperty SIndent2 SMarked"><td class=SEntry><a href="#pair.first" id=link3 onMouseOver="ShowTip(event, 'tt3', 'link3')" onMouseOut="HideTip('tt3')">first</a></td><td class=SDescription>The first value inside the pair.</td></tr><tr class="SProperty SIndent2"><td class=SEntry><a href="#pair.second" id=link4 onMouseOver="ShowTip(event, 'tt4', 'link4')" onMouseOut="HideTip('tt4')">second</a></td><td class=SDescription>The second value inside the pair.</td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#pair.Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#pair.new" id=link5 onMouseOver="ShowTip(event, 'tt5', 'link5')" onMouseOut="HideTip('tt5')">new</a></td><td class=SDescription>Creates a pair of values of types T1 and T2.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#pair.eq" id=link6 onMouseOver="ShowTip(event, 'tt6', 'link6')" onMouseOut="HideTip('tt6')">eq</a></td><td class=SDescription>Returns 1 if this object is equal to the specified pair. </td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#pair.ne" id=link7 onMouseOver="ShowTip(event, 'tt7', 'link7')" onMouseOut="HideTip('tt7')">ne</a></td><td class=SDescription>Returns 1 if this object is not equal to the specified pair. </td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#pair.lt" id=link8 onMouseOver="ShowTip(event, 'tt8', 'link8')" onMouseOut="HideTip('tt8')">lt</a></td><td class=SDescription>Returns 1 if this object is less than the specified pair. </td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#pair.gt" id=link9 onMouseOver="ShowTip(event, 'tt9', 'link9')" onMouseOut="HideTip('tt9')">gt</a></td><td class=SDescription>Returns 1 if this object is greater than the specified pair. </td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#pair.le" id=link10 onMouseOver="ShowTip(event, 'tt10', 'link10')" onMouseOut="HideTip('tt10')">le</a></td><td class=SDescription>Returns 1 if this object is less than or equal to the specified pair. </td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#pair.ge" id=link11 onMouseOver="ShowTip(event, 'tt11', 'link11')" onMouseOut="HideTip('tt11')">ge</a></td><td class=SDescription>Returns 1 if this object is greater than or equal to the specified pair. </td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#pair.clone" id=link12 onMouseOver="ShowTip(event, 'tt12', 'link12')" onMouseOut="HideTip('tt12')">clone</a></td><td class=SDescription>Creates a pair by cloning this object.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#pair.swap" id=link13 onMouseOver="ShowTip(event, 'tt13', 'link13')" onMouseOut="HideTip('tt13')">swap</a></td><td class=SDescription>Swaps the contents of this pair with the ones of the specified pair.</td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div>

<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="pair.Types"></a>Types</h3></div></div>

<div class="CType"><div class=CTopic><h3 class=CTitle><a name="pair.this_type"></a>this_type</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>typedef pair#(</td><td class="PParameter  prettyprint " nowrap>T1,</td></tr><tr><td></td><td class="PParameter  prettyprint " nowrap>T2</td><td class="PAfterParameters  prettyprint "nowrap>) this_type</td></tr></table></td></tr></table></blockquote><p>The shorthand of <b>pair#(T1,T2)</b>.</p></div></div></div>

<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="pair.Properties"></a>Properties</h3></div></div>

<div class="CProperty"><div class=CTopic><h3 class=CTitle><a name="pair.first"></a>first</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">T1 first</td></tr></table></blockquote><p>The first value inside the pair.</p><h4 class=CHeading>Example</h4><blockquote><pre class="prettyprint">pair#(int, string) p = new( 1, &quot;apple&quot; );
assert( p.first == 1 );</pre></blockquote></div></div></div>

<div class="CProperty"><div class=CTopic><h3 class=CTitle><a name="pair.second"></a>second</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">T2 second</td></tr></table></blockquote><p>The second value inside the pair.</p><h4 class=CHeading>Example</h4><blockquote><pre class="prettyprint">pair#(int, string) p = new( 1, &quot;apple&quot; );
assert( p.second == &quot;apple&quot; );</pre></blockquote></div></div></div>

<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="pair.Functions"></a>Functions</h3></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="pair.new"></a>new</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>function new(</td><td class="PType  prettyprint " nowrap>T1&nbsp;</td><td class="PParameter  prettyprint " nowrap>first,</td><td class="PDefaultValuePrefix  prettyprint ">&nbsp;&nbsp;</td><td class="PDefaultValue  prettyprint " width=100%></td></tr><tr><td></td><td class="PType  prettyprint " nowrap>T2&nbsp;</td><td class="PParameter  prettyprint " nowrap>second,</td><td class="PDefaultValuePrefix  prettyprint ">&nbsp;&nbsp;</td><td class="PDefaultValue  prettyprint " width=100%></td></tr><tr><td></td><td class="PType  prettyprint " nowrap>comparator#(this_type)&nbsp;</td><td class="PParameter  prettyprint " nowrap>cmp</td><td class="PDefaultValuePrefix  prettyprint ">&nbsp;=&nbsp;</td><td class="PDefaultValue  prettyprint " width=100%> null</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Creates a pair of values of types T1 and T2.</p><h4 class=CHeading>Arguments</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>first</td><td class=CDLDescription>The first value of a pair.</td></tr><tr><td class=CDLEntry>second</td><td class=CDLDescription>The second value of a pair.</td></tr><tr><td class=CDLEntry>cmp</td><td class=CDLDescription><span class="optional">optional</span> A strategy object used to compare two pairs.&nbsp; If not specified or <b>null</b>, <a href="cl_pair_comparator-svh.html#pair_comparator" class=LClass id=link14 onMouseOver="ShowTip(event, 'tt14', 'link14')" onMouseOut="HideTip('tt14')">pair_comparator</a> <b>#(this_type)</b> is used.&nbsp; The default is <b>null</b>.</td></tr></table><h4 class=CHeading>Returns</h4><p>None.</p><h4 class=CHeading>Example</h4><blockquote><pre class="prettyprint">pair#(int, string) p = new( 1, &quot;apple&quot; );</pre></blockquote></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="pair.eq"></a>eq</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>function bit eq(</td><td class="PTypePrefix  prettyprint " nowrap>const ref&nbsp;</td><td class="PType  prettyprint " nowrap>this_type&nbsp;</td><td class="PParameter  prettyprint " nowrap>p</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns 1 if this object is equal to the specified pair.&nbsp; The comparison is done by the strategy object specified at the object construction.</p><h4 class=CHeading>Argument</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>p</td><td class=CDLDescription>A pair to compare with.</td></tr></table><h4 class=CHeading>Returns</h4><p>If this object is equal to <b>p</b>, then returns 1.&nbsp; Otherwise, returns 0.</p><h4 class=CHeading>Example</h4><blockquote><pre class="prettyprint">pair#(int, string) p = new( 1, &quot;apple&quot; );
pair#(int, string) q = new( 1, &quot;apple&quot; );
assert( p.eq( q ) == 1 ); // 1 == 1 &amp;&amp; &quot;apple&quot; == &quot;apple&quot;</pre></blockquote></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="pair.ne"></a>ne</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>function bit ne(</td><td class="PTypePrefix  prettyprint " nowrap>const ref&nbsp;</td><td class="PType  prettyprint " nowrap>this_type&nbsp;</td><td class="PParameter  prettyprint " nowrap>p</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns 1 if this object is not equal to the specified pair.&nbsp; The comparison is done by the strategy object specified at the object construction.</p><h4 class=CHeading>Argument</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>p</td><td class=CDLDescription>A pair to compare with.</td></tr></table><h4 class=CHeading>Returns</h4><p>If this object is not equal to <b>p</b>, then returns 1.&nbsp; Otherwise, returns 0.</p><h4 class=CHeading>Example</h4><blockquote><pre class="prettyprint">pair#(int, string) p = new( 1, &quot;apple&quot; );
pair#(int, string) q = new( 1, &quot;orange&quot; );
assert( p.ne( q ) == 1 ); // &quot;apple&quot; != &quot;orange&quot;</pre></blockquote></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="pair.lt"></a>lt</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>function bit lt(</td><td class="PTypePrefix  prettyprint " nowrap>const ref&nbsp;</td><td class="PType  prettyprint " nowrap>this_type&nbsp;</td><td class="PParameter  prettyprint " nowrap>p</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns 1 if this object is less than the specified pair.&nbsp; The comparison is done by the strategy object specified at the object construction.</p><h4 class=CHeading>Argument</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>p</td><td class=CDLDescription>A pair to compare with.</td></tr></table><h4 class=CHeading>Returns</h4><p>If this object is less than <b>p</b>, then returns 1.&nbsp; Otherwise, returns 0.</p><h4 class=CHeading>Example</h4><blockquote><pre class="prettyprint">pair#(int, string) p = new( 1, &quot;apple&quot; );
pair#(int, string) q = new( 2, &quot;apple&quot; );
assert( p.lt( q ) == 1 ); // 1 &lt; 2</pre></blockquote></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="pair.gt"></a>gt</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>function bit gt(</td><td class="PTypePrefix  prettyprint " nowrap>const ref&nbsp;</td><td class="PType  prettyprint " nowrap>this_type&nbsp;</td><td class="PParameter  prettyprint " nowrap>p</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns 1 if this object is greater than the specified pair.&nbsp; The comparison is done by the strategy object specified at the object construction.</p><h4 class=CHeading>Argument</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>p</td><td class=CDLDescription>A pair to compare with.</td></tr></table><h4 class=CHeading>Returns</h4><p>If this object is greater than <b>p</b>, then returns 1.&nbsp; Otherwise, returns 0.</p><h4 class=CHeading>Example</h4><blockquote><pre class="prettyprint">pair#(int, string) p = new( 1, &quot;orange&quot; );
pair#(int, string) q = new( 1, &quot;apple&quot; );
assert( p.gt( q ) == 1 ); // &quot;orange&quot; &gt; &quot;apple&quot; by the lexicographical order</pre></blockquote></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="pair.le"></a>le</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>function bit le(</td><td class="PTypePrefix  prettyprint " nowrap>const ref&nbsp;</td><td class="PType  prettyprint " nowrap>this_type&nbsp;</td><td class="PParameter  prettyprint " nowrap>p</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns 1 if this object is less than or equal to the specified pair.&nbsp; The comparison is done by the strategy object specified at the object construction.</p><h4 class=CHeading>Argument</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>p</td><td class=CDLDescription>A pair to compare with.</td></tr></table><h4 class=CHeading>Returns</h4><p>If this object is less than or equal to <b>p</b>, then returns 1.&nbsp; Otherwise, returns 0.</p><h4 class=CHeading>Example</h4><blockquote><pre class="prettyprint">pair#(int, string) p = new( 1, &quot;apple&quot; );
pair#(int, string) q = new( 1, &quot;orange&quot; );
assert( p.le( q ) == 1 ); // &quot;apple&quot; &lt; &quot;orange&quot; by the lexicographical order</pre></blockquote></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="pair.ge"></a>ge</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>function bit ge(</td><td class="PTypePrefix  prettyprint " nowrap>const ref&nbsp;</td><td class="PType  prettyprint " nowrap>this_type&nbsp;</td><td class="PParameter  prettyprint " nowrap>p</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns 1 if this object is greater than or equal to the specified pair.&nbsp; The comparison is done by the strategy object specified at the object construction.</p><h4 class=CHeading>Argument</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>p</td><td class=CDLDescription>A pair to compare with.</td></tr></table><h4 class=CHeading>Returns</h4><p>If this object is greater than or equal to <b>p</b>, then returns 1.&nbsp; Otherwise, returns 0.</p><h4 class=CHeading>Example</h4><blockquote><pre class="prettyprint">pair#(int, string) p = new( 2, &quot;apple&quot; );
pair#(int, string) q = new( 1, &quot;orange&quot; );
assert( p.ge( q ) == 1 ); // 2 &gt; 1</pre></blockquote></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="pair.clone"></a>clone</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">function this_type clone()</td></tr></table></blockquote><p>Creates a pair by cloning this object.</p><h4 class=CHeading>Returns</h4><p>A cloned pair.</p><h4 class=CHeading>Example</h4><blockquote><pre class="prettyprint">pair#(int, string) p = new( 1, &quot;apple&quot; );
pair#(int, string) q = p.clone();
assert( p.eq( q ) == 1 );</pre></blockquote></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="pair.swap"></a>swap</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>function void swap(</td><td class="PTypePrefix  prettyprint " nowrap>ref&nbsp;</td><td class="PType  prettyprint " nowrap>this_type&nbsp;</td><td class="PParameter  prettyprint " nowrap>p</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Swaps the contents of this pair with the ones of the specified pair.</p><h4 class=CHeading>Argument</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>p</td><td class=CDLDescription>A pair to swap the contents.</td></tr></table><h4 class=CHeading>Example</h4><blockquote><pre class="prettyprint">pair#(int, string) p = new( 1, &quot;apple&quot; );
pair#(int, string) q = new( 2, &quot;orange&quot; );
p.swap( q );
assert( p.first == 2 );
assert( q.first == 1 );
assert( p.second == &quot;orange&quot; );
assert( q.second == &quot;apple&quot; );</pre></blockquote></div></div></div>

</div><!--Content-->



<!--START_ND_TOOLTIPS-->
<div class=CToolTip id="tt1"><div class=CClass><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>class pair#(</td><td class="PType  prettyprint " nowrap>type&nbsp;</td><td class="PParameter  prettyprint " nowrap>T1</td><td class="PDefaultValuePrefix  prettyprint ">&nbsp;=&nbsp;</td><td class="PDefaultValue  prettyprint " width=100%> int,</td></tr><tr><td></td><td class="PType  prettyprint " nowrap>type&nbsp;</td><td class="PParameter  prettyprint " nowrap>T2</td><td class="PDefaultValuePrefix  prettyprint ">&nbsp;=&nbsp;</td><td class="PDefaultValue  prettyprint " width=100%> T1</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Provides a pair that carries two values, which can be different types.</div></div><div class=CToolTip id="tt2"><div class=CType><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>typedef pair#(</td><td class="PParameter  prettyprint " nowrap>T1,</td></tr><tr><td></td><td class="PParameter  prettyprint " nowrap>T2</td><td class="PAfterParameters  prettyprint "nowrap>) this_type</td></tr></table></td></tr></table></blockquote>The shorthand of <b>pair#(T1,T2)</b>.</div></div><div class=CToolTip id="tt3"><div class=CProperty><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">T1 first</td></tr></table></blockquote>The first value inside the pair.</div></div><div class=CToolTip id="tt4"><div class=CProperty><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">T2 second</td></tr></table></blockquote>The second value inside the pair.</div></div><div class=CToolTip id="tt5"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>function new(</td><td class="PType  prettyprint " nowrap>T1&nbsp;</td><td class="PParameter  prettyprint " nowrap>first,</td><td class="PDefaultValuePrefix  prettyprint ">&nbsp;&nbsp;</td><td class="PDefaultValue  prettyprint " width=100%></td></tr><tr><td></td><td class="PType  prettyprint " nowrap>T2&nbsp;</td><td class="PParameter  prettyprint " nowrap>second,</td><td class="PDefaultValuePrefix  prettyprint ">&nbsp;&nbsp;</td><td class="PDefaultValue  prettyprint " width=100%></td></tr><tr><td></td><td class="PType  prettyprint " nowrap>comparator#(this_type)&nbsp;</td><td class="PParameter  prettyprint " nowrap>cmp</td><td class="PDefaultValuePrefix  prettyprint ">&nbsp;=&nbsp;</td><td class="PDefaultValue  prettyprint " width=100%> null</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Creates a pair of values of types T1 and T2.</div></div><div class=CToolTip id="tt6"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>function bit eq(</td><td class="PTypePrefix  prettyprint " nowrap>const ref&nbsp;</td><td class="PType  prettyprint " nowrap>this_type&nbsp;</td><td class="PParameter  prettyprint " nowrap>p</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Returns 1 if this object is equal to the specified pair. </div></div><div class=CToolTip id="tt7"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>function bit ne(</td><td class="PTypePrefix  prettyprint " nowrap>const ref&nbsp;</td><td class="PType  prettyprint " nowrap>this_type&nbsp;</td><td class="PParameter  prettyprint " nowrap>p</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Returns 1 if this object is not equal to the specified pair. </div></div><div class=CToolTip id="tt8"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>function bit lt(</td><td class="PTypePrefix  prettyprint " nowrap>const ref&nbsp;</td><td class="PType  prettyprint " nowrap>this_type&nbsp;</td><td class="PParameter  prettyprint " nowrap>p</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Returns 1 if this object is less than the specified pair. </div></div><div class=CToolTip id="tt9"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>function bit gt(</td><td class="PTypePrefix  prettyprint " nowrap>const ref&nbsp;</td><td class="PType  prettyprint " nowrap>this_type&nbsp;</td><td class="PParameter  prettyprint " nowrap>p</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Returns 1 if this object is greater than the specified pair. </div></div><div class=CToolTip id="tt10"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>function bit le(</td><td class="PTypePrefix  prettyprint " nowrap>const ref&nbsp;</td><td class="PType  prettyprint " nowrap>this_type&nbsp;</td><td class="PParameter  prettyprint " nowrap>p</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Returns 1 if this object is less than or equal to the specified pair. </div></div><div class=CToolTip id="tt11"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>function bit ge(</td><td class="PTypePrefix  prettyprint " nowrap>const ref&nbsp;</td><td class="PType  prettyprint " nowrap>this_type&nbsp;</td><td class="PParameter  prettyprint " nowrap>p</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Returns 1 if this object is greater than or equal to the specified pair. </div></div><div class=CToolTip id="tt12"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">function this_type clone()</td></tr></table></blockquote>Creates a pair by cloning this object.</div></div><div class=CToolTip id="tt13"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>function void swap(</td><td class="PTypePrefix  prettyprint " nowrap>ref&nbsp;</td><td class="PType  prettyprint " nowrap>this_type&nbsp;</td><td class="PParameter  prettyprint " nowrap>p</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Swaps the contents of this pair with the ones of the specified pair.</div></div><div class=CToolTip id="tt14"><div class=CClass><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>class pair_comparator#(</td><td class="PType  prettyprint " nowrap>type&nbsp;</td><td class="PParameter  prettyprint " nowrap>T</td><td class="PDefaultValuePrefix  prettyprint ">&nbsp;=&nbsp;</td><td class="PDefaultValue  prettyprint " width=100%> pair</td><td class="PAfterParameters  prettyprint "nowrap>) extends comparator#(T)</td></tr></table></td></tr></table></blockquote><span class="singleton">singleton</span> Provides strategies to compare pairs.</div></div><!--END_ND_TOOLTIPS-->

<script language=JavaScript><!--
if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html>